home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 August: Tool Chest / Dev.CD Aug 98 TC.toast / Tool Chest / Development Kits / MPW etc. / MPW-GM / Interfaces&Libraries / Interfaces / CIncludes / HFSVolumes.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-17  |  19.6 KB  |  505 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        HFSVolumes.h
  3.  
  4.      Contains:    On-disk data structures for HFS and HFS Plus volumes.
  5.  
  6.      Version:    Technology:    
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1984-1998 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __HFSVOLUMES__
  19. #define __HFSVOLUMES__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __FILES__
  25. #include <Files.h>
  26. #endif
  27. #ifndef __FINDER__
  28. #include <Finder.h>
  29. #endif
  30.  
  31.  
  32.  
  33.  
  34. #if PRAGMA_ONCE
  35. #pragma once
  36. #endif
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41.  
  42. #if PRAGMA_IMPORT
  43. #pragma import on
  44. #endif
  45.  
  46. #if PRAGMA_STRUCT_ALIGN
  47.     #pragma options align=mac68k
  48. #elif PRAGMA_STRUCT_PACKPUSH
  49.     #pragma pack(push, 2)
  50. #elif PRAGMA_STRUCT_PACK
  51.     #pragma pack(2)
  52. #endif
  53.  
  54. /* Signatures used to differentiate between HFS and HFS Plus volumes */
  55.  
  56. enum {
  57.     kHFSSigWord                    = 0x4244,                        /* 'BD' in ASCII */
  58.     kHFSPlusSigWord                = 0x482B,                        /* 'H+' in ASCII */
  59.     kHFSPlusVersion                = 0x0004,                        /* will change as format changes (version 4 shipped with Mac OS 8.1) */
  60.     kHFSPlusMountVersion        = FOUR_CHAR_CODE('8.10')        /* will change as implementations change ('8.10' in Mac OS 8.1) */
  61. };
  62.  
  63.  
  64. /* CatalogNodeID is used to track catalog objects */
  65. typedef UInt32                             HFSCatalogNodeID;
  66. /* Unicode strings are used for file and folder names (HFS Plus only) */
  67.  
  68. struct HFSUniStr255 {
  69.     UInt16                             length;                        /* number of unicode characters */
  70.     UniChar                         unicode[255];                /* unicode characters */
  71. };
  72. typedef struct HFSUniStr255                HFSUniStr255;
  73.  
  74. typedef const HFSUniStr255 *            ConstHFSUniStr255Param;
  75.  
  76. enum {
  77.     kHFSMaxVolumeNameChars        = 27,
  78.     kHFSMaxFileNameChars        = 31,
  79.     kHFSPlusMaxFileNameChars    = 255
  80. };
  81.  
  82.  
  83. /* Extent overflow file data structures */
  84. /* HFS Extent key */
  85.  
  86. struct HFSExtentKey {
  87.     UInt8                             keyLength;                    /* length of key, excluding this field */
  88.     UInt8                             forkType;                    /* 0 = data fork, FF = resource fork */
  89.     HFSCatalogNodeID                 fileID;                        /* file ID */
  90.     UInt16                             startBlock;                    /* first file allocation block number in this extent */
  91. };
  92. typedef struct HFSExtentKey                HFSExtentKey;
  93. /* HFS Plus Extent key */
  94.  
  95. struct HFSPlusExtentKey {
  96.     UInt16                             keyLength;                    /* length of key, excluding this field */
  97.     UInt8                             forkType;                    /* 0 = data fork, FF = resource fork */
  98.     UInt8                             pad;                        /* make the other fields align on 32-bit boundary */
  99.     HFSCatalogNodeID                 fileID;                        /* file ID */
  100.     UInt32                             startBlock;                    /* first file allocation block number in this extent */
  101. };
  102. typedef struct HFSPlusExtentKey            HFSPlusExtentKey;
  103. /* Number of extent descriptors per extent record */
  104.  
  105. enum {
  106.     kHFSExtentDensity            = 3,
  107.     kHFSPlusExtentDensity        = 8
  108. };
  109.  
  110. /* HFS extent descriptor */
  111.  
  112. struct HFSExtentDescriptor {
  113.     UInt16                             startBlock;                    /* first allocation block */
  114.     UInt16                             blockCount;                    /* number of allocation blocks */
  115. };
  116. typedef struct HFSExtentDescriptor        HFSExtentDescriptor;
  117. /* HFS Plus extent descriptor */
  118.  
  119. struct HFSPlusExtentDescriptor {
  120.     UInt32                             startBlock;                    /* first allocation block */
  121.     UInt32                             blockCount;                    /* number of allocation blocks */
  122. };
  123. typedef struct HFSPlusExtentDescriptor    HFSPlusExtentDescriptor;
  124. /* HFS extent record */
  125.  
  126. typedef HFSExtentDescriptor             HFSExtentRecord[3];
  127. /* HFS Plus extent record */
  128. typedef HFSPlusExtentDescriptor         HFSPlusExtentRecord[8];
  129.  
  130. /* Fork data info (HFS Plus only) - 80 bytes */
  131.  
  132. struct HFSPlusForkData {
  133.     UInt64                             logicalSize;                /* fork's logical size in bytes */
  134.     UInt32                             clumpSize;                    /* fork's clump size in bytes */
  135.     UInt32                             totalBlocks;                /* total blocks used by this fork */
  136.     HFSPlusExtentRecord             extents;                    /* initial set of extents */
  137. };
  138. typedef struct HFSPlusForkData            HFSPlusForkData;
  139. /* Permissions info (HFS Plus only) - 16 bytes */
  140.  
  141. struct HFSPlusPermissions {
  142.     UInt32                             ownerID;                    /* user or group ID of file/folder owner */
  143.     UInt32                             groupID;                    /* additional user of group ID */
  144.     UInt32                             permissions;                /* permissions (bytes: unused, owner, group, everyone) */
  145.     UInt32                             specialDevice;                /* UNIX: device for character or block special file */
  146. };
  147. typedef struct HFSPlusPermissions        HFSPlusPermissions;
  148. /* Catalog file data structures */
  149.  
  150. enum {
  151.     kHFSRootParentID            = 1,                            /* Parent ID of the root folder */
  152.     kHFSRootFolderID            = 2,                            /* Folder ID of the root folder */
  153.     kHFSExtentsFileID            = 3,                            /* File ID of the extents file */
  154.     kHFSCatalogFileID            = 4,                            /* File ID of the catalog file */
  155.     kHFSBadBlockFileID            = 5,                            /* File ID of the bad allocation block file */
  156.     kHFSAllocationFileID        = 6,                            /* File ID of the allocation file (HFS Plus only) */
  157.     kHFSStartupFileID            = 7,                            /* File ID of the startup file (HFS Plus only) */
  158.     kHFSAttributesFileID        = 8,                            /* File ID of the attribute file (HFS Plus only) */
  159.     kHFSBogusExtentFileID        = 15,                            /* Used for exchanging extents in extents file */
  160.     kHFSFirstUserCatalogNodeID    = 16
  161. };
  162.  
  163.  
  164. /* HFS catalog key */
  165.  
  166. struct HFSCatalogKey {
  167.     UInt8                             keyLength;                    /* key length (in bytes) */
  168.     UInt8                             reserved;                    /* reserved (set to zero) */
  169.     HFSCatalogNodeID                 parentID;                    /* parent folder ID */
  170.     Str31                             nodeName;                    /* catalog node name */
  171. };
  172. typedef struct HFSCatalogKey            HFSCatalogKey;
  173. /* HFS Plus catalog key */
  174.  
  175. struct HFSPlusCatalogKey {
  176.     UInt16                             keyLength;                    /* key length (in bytes) */
  177.     HFSCatalogNodeID                 parentID;                    /* parent folder ID */
  178.     HFSUniStr255                     nodeName;                    /* catalog node name */
  179. };
  180. typedef struct HFSPlusCatalogKey        HFSPlusCatalogKey;
  181.  
  182. /* Catalog record types */
  183.  
  184. enum {
  185.                                                                 /* HFS Catalog Records */
  186.     kHFSFolderRecord            = 0x0100,                        /* Folder record */
  187.     kHFSFileRecord                = 0x0200,                        /* File record */
  188.     kHFSFolderThreadRecord        = 0x0300,                        /* Folder thread record */
  189.     kHFSFileThreadRecord        = 0x0400,                        /* File thread record */
  190.                                                                 /* HFS Plus Catalog Records */
  191.     kHFSPlusFolderRecord        = 1,                            /* Folder record */
  192.     kHFSPlusFileRecord            = 2,                            /* File record */
  193.     kHFSPlusFolderThreadRecord    = 3,                            /* Folder thread record */
  194.     kHFSPlusFileThreadRecord    = 4                                /* File thread record */
  195. };
  196.  
  197.  
  198. /* Catalog file record flags */
  199.  
  200. enum {
  201.     kHFSFileLockedBit            = 0x0000,                        /* file is locked and cannot be written to */
  202.     kHFSFileLockedMask            = 0x0001,
  203.     kHFSThreadExistsBit            = 0x0001,                        /* a file thread record exists for this file */
  204.     kHFSThreadExistsMask        = 0x0002
  205. };
  206.  
  207.  
  208. /* HFS catalog folder record - 70 bytes */
  209.  
  210. struct HFSCatalogFolder {
  211.     SInt16                             recordType;                    /* record type */
  212.     UInt16                             flags;                        /* folder flags */
  213.     UInt16                             valence;                    /* folder valence */
  214.     HFSCatalogNodeID                 folderID;                    /* folder ID */
  215.     UInt32                             createDate;                    /* date and time of creation */
  216.     UInt32                             modifyDate;                    /* date and time of last modification */
  217.     UInt32                             backupDate;                    /* date and time of last backup */
  218.     DInfo                             userInfo;                    /* Finder information */
  219.     DXInfo                             finderInfo;                    /* additional Finder information */
  220.     UInt32                             reserved[4];                /* reserved - set to zero */
  221. };
  222. typedef struct HFSCatalogFolder            HFSCatalogFolder;
  223. /* HFS Plus catalog folder record - 88 bytes */
  224.  
  225. struct HFSPlusCatalogFolder {
  226.     SInt16                             recordType;                    /* record type = HFS Plus folder record */
  227.     UInt16                             flags;                        /* file flags */
  228.     UInt32                             valence;                    /* folder's valence (limited to 2^16 in Mac OS) */
  229.     HFSCatalogNodeID                 folderID;                    /* folder ID */
  230.     UInt32                             createDate;                    /* date and time of creation */
  231.     UInt32                             contentModDate;                /* date and time of last content modification */
  232.     UInt32                             attributeModDate;            /* date and time of last attribute modification */
  233.     UInt32                             accessDate;                    /* date and time of last access (Rhapsody only) */
  234.     UInt32                             backupDate;                    /* date and time of last backup */
  235.     HFSPlusPermissions                 permissions;                /* permissions (for Rhapsody) */
  236.     DInfo                             userInfo;                    /* Finder information */
  237.     DXInfo                             finderInfo;                    /* additional Finder information */
  238.     UInt32                             textEncoding;                /* hint for name conversions */
  239.     UInt32                             reserved;                    /* reserved - set to zero */
  240. };
  241. typedef struct HFSPlusCatalogFolder        HFSPlusCatalogFolder;
  242. /* HFS catalog file record - 102 bytes */
  243.  
  244. struct HFSCatalogFile {
  245.     SInt16                             recordType;                    /* record type */
  246.     SInt8                             flags;                        /* file flags */
  247.     SInt8                             fileType;                    /* file type (unused ?) */
  248.     FInfo                             userInfo;                    /* Finder information */
  249.     HFSCatalogNodeID                 fileID;                        /* file ID */
  250.     UInt16                             dataStartBlock;                /* not used - set to zero */
  251.     SInt32                             dataLogicalSize;            /* logical EOF of data fork */
  252.     SInt32                             dataPhysicalSize;            /* physical EOF of data fork */
  253.     UInt16                             rsrcStartBlock;                /* not used - set to zero */
  254.     SInt32                             rsrcLogicalSize;            /* logical EOF of resource fork */
  255.     SInt32                             rsrcPhysicalSize;            /* physical EOF of resource fork */
  256.     UInt32                             createDate;                    /* date and time of creation */
  257.     UInt32                             modifyDate;                    /* date and time of last modification */
  258.     UInt32                             backupDate;                    /* date and time of last backup */
  259.     FXInfo                             finderInfo;                    /* additional Finder information */
  260.     UInt16                             clumpSize;                    /* file clump size (not used) */
  261.     HFSExtentRecord                 dataExtents;                /* first data fork extent record */
  262.     HFSExtentRecord                 rsrcExtents;                /* first resource fork extent record */
  263.     UInt32                             reserved;                    /* reserved - set to zero */
  264. };
  265. typedef struct HFSCatalogFile            HFSCatalogFile;
  266. /* HFS Plus catalog file record - 248 bytes */
  267.  
  268. struct HFSPlusCatalogFile {
  269.     SInt16                             recordType;                    /* record type = HFS Plus file record */
  270.     UInt16                             flags;                        /* file flags */
  271.     UInt32                             reserved1;                    /* reserved - set to zero */
  272.     HFSCatalogNodeID                 fileID;                        /* file ID */
  273.     UInt32                             createDate;                    /* date and time of creation */
  274.     UInt32                             contentModDate;                /* date and time of last content modification */
  275.     UInt32                             attributeModDate;            /* date and time of last attribute modification */
  276.     UInt32                             accessDate;                    /* date and time of last access (Rhapsody only) */
  277.     UInt32                             backupDate;                    /* date and time of last backup */
  278.     HFSPlusPermissions                 permissions;                /* permissions (for Rhapsody) */
  279.     FInfo                             userInfo;                    /* Finder information */
  280.     FXInfo                             finderInfo;                    /* additional Finder information */
  281.     UInt32                             textEncoding;                /* hint for name conversions */
  282.     UInt32                             reserved2;                    /* reserved - set to zero */
  283.  
  284.                                                                 /* start on double long (64 bit) boundry */
  285.     HFSPlusForkData                 dataFork;                    /* size and block data for data fork */
  286.     HFSPlusForkData                 resourceFork;                /* size and block data for resource fork */
  287. };
  288. typedef struct HFSPlusCatalogFile        HFSPlusCatalogFile;
  289. /* HFS catalog thread record - 46 bytes */
  290.  
  291. struct HFSCatalogThread {
  292.     SInt16                             recordType;                    /* record type */
  293.     SInt32                             reserved[2];                /* reserved - set to zero */
  294.     HFSCatalogNodeID                 parentID;                    /* parent ID for this catalog node */
  295.     Str31                             nodeName;                    /* name of this catalog node */
  296. };
  297. typedef struct HFSCatalogThread            HFSCatalogThread;
  298. /* HFS Plus catalog thread record -- 264 bytes */
  299.  
  300. struct HFSPlusCatalogThread {
  301.     SInt16                             recordType;                    /* record type */
  302.     SInt16                             reserved;                    /* reserved - set to zero */
  303.     HFSCatalogNodeID                 parentID;                    /* parent ID for this catalog node */
  304.     HFSUniStr255                     nodeName;                    /* name of this catalog node (variable length) */
  305. };
  306. typedef struct HFSPlusCatalogThread        HFSPlusCatalogThread;
  307.  
  308. /*
  309.       These are the types of records in the attribute B-tree.  The values were chosen
  310.       so that they wouldn't conflict with the catalog record types.
  311. */
  312.  
  313. enum {
  314.     kHFSPlusAttrInlineData        = 0x10,                            /* if size <  kAttrOverflowSize */
  315.     kHFSPlusAttrForkData        = 0x20,                            /* if size >= kAttrOverflowSize */
  316.     kHFSPlusAttrExtents            = 0x30                            /* overflow extents for large attributes */
  317. };
  318.  
  319.  
  320. /*
  321.       HFSPlusAttrInlineData
  322.       For small attributes, whose entire value is stored within this one
  323.       B-tree record.
  324.       There would not be any other records for this attribute.
  325. */
  326.  
  327. struct HFSPlusAttrInlineData {
  328.     UInt32                             recordType;                    /*    = kHFSPlusAttrInlineData*/
  329.     UInt32                             reserved;
  330.     UInt32                             logicalSize;                /*    size in bytes of userData*/
  331.     Byte                             userData[2];                /*    variable length; space allocated is a multiple of 2 bytes*/
  332. };
  333. typedef struct HFSPlusAttrInlineData    HFSPlusAttrInlineData;
  334. /*
  335.       HFSPlusAttrForkData
  336.       For larger attributes, whose value is stored in allocation blocks.
  337.       If the attribute has more than 8 extents, there will be additonal
  338.       records (of type HFSPlusAttrExtents) for this attribute.
  339. */
  340.  
  341. struct HFSPlusAttrForkData {
  342.     UInt32                             recordType;                    /*    = kHFSPlusAttrForkData*/
  343.     UInt32                             reserved;
  344.     HFSPlusForkData                 theFork;                    /*    size and first extents of value*/
  345. };
  346. typedef struct HFSPlusAttrForkData        HFSPlusAttrForkData;
  347. /*
  348.       HFSPlusAttrExtents
  349.       This record contains information about overflow extents for large,
  350.       fragmented attributes.
  351. */
  352.  
  353. struct HFSPlusAttrExtents {
  354.     UInt32                             recordType;                    /*    = kHFSPlusAttrExtents*/
  355.     UInt32                             reserved;
  356.     HFSPlusExtentRecord             extents;                    /*    additional extents*/
  357. };
  358. typedef struct HFSPlusAttrExtents        HFSPlusAttrExtents;
  359. /*    A generic Attribute Record*/
  360.  
  361. union HFSPlusAttrRecord {
  362.     UInt32                             recordType;
  363.     HFSPlusAttrInlineData             inlineData;
  364.     HFSPlusAttrForkData             forkData;
  365.     HFSPlusAttrExtents                 overflowExtents;
  366. };
  367. typedef union HFSPlusAttrRecord            HFSPlusAttrRecord;
  368. /* Key and node lengths */
  369.  
  370. enum {
  371.     kHFSPlusExtentKeyMaximumLength = sizeof(HFSPlusExtentKey) - sizeof(UInt16),
  372.     kHFSExtentKeyMaximumLength    = sizeof(HFSExtentKey) - sizeof(UInt8),
  373.     kHFSPlusCatalogKeyMaximumLength = sizeof(HFSPlusCatalogKey) - sizeof(UInt16),
  374.     kHFSPlusCatalogKeyMinimumLength = kHFSPlusCatalogKeyMaximumLength - sizeof(HFSUniStr255) + sizeof(UInt16),
  375.     kHFSCatalogKeyMaximumLength    = sizeof(HFSCatalogKey) - sizeof(UInt8),
  376.     kHFSCatalogKeyMinimumLength    = kHFSCatalogKeyMaximumLength - sizeof(Str31) + sizeof(UInt8),
  377.     kHFSPlusCatalogMinNodeSize    = 4096,
  378.     kHFSPlusExtentMinNodeSize    = 512,
  379.     kHFSPlusAttrMinNodeSize        = 4096
  380. };
  381.  
  382.  
  383. /* HFS and HFS Plus volume attribute bits */
  384.  
  385. enum {
  386.                                                                 /* Bits 0-6 are reserved (always cleared by MountVol call) */
  387.     kHFSVolumeHardwareLockBit    = 7,                            /* volume is locked by hardware */
  388.     kHFSVolumeUnmountedBit        = 8,                            /* volume was successfully unmounted */
  389.     kHFSVolumeSparedBlocksBit    = 9,                            /* volume has bad blocks spared */
  390.     kHFSVolumeNoCacheRequiredBit = 10,                            /* don't cache volume blocks (i.e. RAM or ROM disk) */
  391.     kHFSBootVolumeInconsistentBit = 11,                            /* boot volume is inconsistent (System 7.6 and later) */
  392.                                                                 /* Bits 12-14 are reserved for future use */
  393.     kHFSVolumeSoftwareLockBit    = 15,                            /* volume is locked by software */
  394.     kHFSVolumeHardwareLockMask    = 1 << kHFSVolumeHardwareLockBit,
  395.     kHFSVolumeUnmountedMask        = 1 << kHFSVolumeUnmountedBit,
  396.     kHFSVolumeSparedBlocksMask    = 1 << kHFSVolumeSparedBlocksBit,
  397.     kHFSVolumeNoCacheRequiredMask = 1 << kHFSVolumeNoCacheRequiredBit,
  398.     kHFSBootVolumeInconsistentMask = 1 << kHFSBootVolumeInconsistentBit,
  399.     kHFSVolumeSoftwareLockMask    = 1 << kHFSVolumeSoftwareLockBit,
  400.     kHFSMDBAttributesMask        = 0x8380
  401. };
  402.  
  403.  
  404. /* Master Directory Block (HFS only) - 162 bytes */
  405. /* Stored at sector #2 (3rd sector) */
  406.  
  407. struct HFSMasterDirectoryBlock {
  408.  
  409.                                                                 /* These first fields are also used by MFS */
  410.  
  411.     UInt16                             drSigWord;                    /* volume signature */
  412.     UInt32                             drCrDate;                    /* date and time of volume creation */
  413.     UInt32                             drLsMod;                    /* date and time of last modification */
  414.     UInt16                             drAtrb;                        /* volume attributes */
  415.     SInt16                             drNmFls;                    /* number of files in root folder */
  416.     UInt16                             drVBMSt;                    /* first block of volume bitmap */
  417.     UInt16                             drAllocPtr;                    /* start of next allocation search */
  418.     UInt16                             drNmAlBlks;                    /* number of allocation blocks in volume */
  419.     SInt32                             drAlBlkSiz;                    /* size (in bytes) of allocation blocks */
  420.     SInt32                             drClpSiz;                    /* default clump size */
  421.     SInt16                             drAlBlSt;                    /* first allocation block in volume */
  422.     UInt32                             drNxtCNID;                    /* next unused catalog node ID */
  423.     SInt16                             drFreeBks;                    /* number of unused allocation blocks */
  424.     Str27                             drVN;                        /* volume name */
  425.  
  426.                                                                 /* Master Directory Block extensions for HFS */
  427.  
  428.     UInt32                             drVolBkUp;                    /* date and time of last backup */
  429.     UInt16                             drVSeqNum;                    /* volume backup sequence number */
  430.     SInt32                             drWrCnt;                    /* volume write count */
  431.     SInt32                             drXTClpSiz;                    /* clump size for extents overflow file */
  432.     SInt32                             drCTClpSiz;                    /* clump size for catalog file */
  433.     SInt16                             drNmRtDirs;                    /* number of directories in root folder */
  434.     SInt32                             drFilCnt;                    /* number of files in volume */
  435.     SInt32                             drDirCnt;                    /* number of directories in volume */
  436.     SInt32                             drFndrInfo[8];                /* information used by the Finder */
  437.     UInt16                             drEmbedSigWord;                /* embedded volume signature (formerly drVCSize) */
  438.     HFSExtentDescriptor             drEmbedExtent;                /* embedded volume location and size (formerly drVBMCSize and drCtlCSize) */
  439.     SInt32                             drXTFlSize;                    /* size of extents overflow file */
  440.     HFSExtentRecord                 drXTExtRec;                    /* extent record for extents overflow file */
  441.     SInt32                             drCTFlSize;                    /* size of catalog file */
  442.     HFSExtentRecord                 drCTExtRec;                    /* extent record for catalog file */
  443. };
  444. typedef struct HFSMasterDirectoryBlock    HFSMasterDirectoryBlock;
  445. /* HFSPlusVolumeHeader (HFS Plus only) - 512 bytes */
  446. /* Stored at sector #0 (1st sector) and last sector */
  447.  
  448. struct HFSPlusVolumeHeader {
  449.     UInt16                             signature;                    /* volume signature == 'H+' */
  450.     UInt16                             version;                    /* current version is kHFSPlusVersion */
  451.     UInt32                             attributes;                    /* volume attributes */
  452.     UInt32                             lastMountedVersion;            /* implementation version which last mounted volume */
  453.     UInt32                             reserved;                    /* reserved - set to zero */
  454.  
  455.     UInt32                             createDate;                    /* date and time of volume creation */
  456.     UInt32                             modifyDate;                    /* date and time of last modification */
  457.     UInt32                             backupDate;                    /* date and time of last backup */
  458.     UInt32                             checkedDate;                /* date and time of last disk check */
  459.  
  460.     UInt32                             fileCount;                    /* number of files in volume */
  461.     UInt32                             folderCount;                /* number of directories in volume */
  462.  
  463.     UInt32                             blockSize;                    /* size (in bytes) of allocation blocks */
  464.     UInt32                             totalBlocks;                /* number of allocation blocks in volume (includes this header and VBM*/
  465.     UInt32                             freeBlocks;                    /* number of unused allocation blocks */
  466.  
  467.     UInt32                             nextAllocation;                /* start of next allocation search */
  468.     UInt32                             rsrcClumpSize;                /* default resource fork clump size */
  469.     UInt32                             dataClumpSize;                /* default data fork clump size */
  470.     HFSCatalogNodeID                 nextCatalogID;                /* next unused catalog node ID */
  471.  
  472.     UInt32                             writeCount;                    /* volume write count */
  473.     UInt64                             encodingsBitmap;            /* which encodings have been use  on this volume */
  474.  
  475.     UInt8                             finderInfo[32];                /* information used by the Finder */
  476.  
  477.     HFSPlusForkData                 allocationFile;                /* allocation bitmap file */
  478.     HFSPlusForkData                 extentsFile;                /* extents B-tree file */
  479.     HFSPlusForkData                 catalogFile;                /* catalog B-tree file */
  480.     HFSPlusForkData                 attributesFile;                /* extended attributes B-tree file */
  481.     HFSPlusForkData                 startupFile;                /* boot file */
  482. };
  483. typedef struct HFSPlusVolumeHeader        HFSPlusVolumeHeader;
  484.  
  485. #if PRAGMA_STRUCT_ALIGN
  486.     #pragma options align=reset
  487. #elif PRAGMA_STRUCT_PACKPUSH
  488.     #pragma pack(pop)
  489. #elif PRAGMA_STRUCT_PACK
  490.     #pragma pack()
  491. #endif
  492.  
  493. #ifdef PRAGMA_IMPORT_OFF
  494. #pragma import off
  495. #elif PRAGMA_IMPORT
  496. #pragma import reset
  497. #endif
  498.  
  499. #ifdef __cplusplus
  500. }
  501. #endif
  502.  
  503. #endif /* __HFSVOLUMES__ */
  504.  
  505.